#!/bin/sh

version=0.1

chmod -R +x flappscripts
PATH=~/bin:$PATH

while :
do

  clear

  echo 
  echo "================================================="
  echo "*      Easy aospX Compiler by flappjaxxx        *"
  echo "================================================="
  echo
  echo "  1 - Repo Sync"
  echo "  2 - Make clean/clobber"
  echo "  3 - Compile"
  echo "  4 - Make clean/clobber and repo sync"
  echo "  5 - Make clean/clobber, repo sync and compile"
  echo "  Do The Following First 71-72"
  echo "  ----------------------"
  echo "  71 - Install repo application"
  echo "  72 - Initialize repo"
  echo
  echo "  x - Exit"
  echo
  echo 
  echo -n "Enter option: "
  read opt
  
  if [ "$?" != "1" ]
  then
    case $opt in
      1) sh flappscripts/build1.sh; echo "Done.";;
      2) sh flappscripts/build2.sh; echo "Done.";;     
      3) sh flappscripts/build3.sh; echo "Done.";;
      4) sh flappscripts/build4.sh; echo "Done.";;
      5) sh flappscripts/build5.sh; echo "Done.";;
      71) sh flappscripts/build71.sh; echo "Done.";;
      72) sh flappscripts/build72.sh; echo "Repo Initialized"; echo "Please Sync Repo Now";;
      x) clear; echo; echo "Goodbye."; echo; exit 1;;
      *) echo "Invalid option"; continue;;
    esac
  fi

  flappscripts/press_enter

done

